dynamic scoping in perl